﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="QuanLySP.aspx.cs" Inherits="ParadiseShophcm.Admin.QuanLySP" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
            <div class="fromTitle">
            <table id="tbTile" cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
            <td class="tile-left" style="width:20px; height:16px;"></td>
            <td class="tile-center" style="height:16px;">Quản lý danh sách sản phẩm</td>
            <td class="tile-right" style="height:16px;"></td>
            </tr>
            </table>
            </div>
           <table align="center" style="width: 100%">
           <tr>
                <td align="right">
                <asp:LinkButton ID="LbAdd" runat="server" onclick="LbAdd_Click"><img src="img/AddfileIcon.jpg" border="0" />Thêm mới</asp:LinkButton>
                </td>
           </tr>

           <tr>
                <td align="left">
                    <asp:GridView ID="grvDanhSachSP" runat="server" AutoGenerateColumns="False" 
                        CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" 
                        >
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="Mã Sản Phẩm" SortExpression="MaSanPham">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("MaSanPham") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="LbMaSanPham" runat="server" Text='<%# Bind("MaSanPham") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Tên Sản Phẩm" SortExpression="TenSanPham">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("TenSanPham") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("TenSanPham") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Giá" SortExpression="Gia">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Gia") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("Gia") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Ngày Đăng" SortExpression="NgayDang">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("NgayDang") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("NgayDang") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="EDit">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LbEdit" runat="server" onclick="LbEdit_Click"><img src="img/icon_edit.gif"  border="0" /></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                             <asp:TemplateField HeaderText="Delete">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LbDelete" runat="server" onclick="LbDelete_Click"><img src="img/delete-icon.gif" border="0" /></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <SortedAscendingCellStyle BackColor="#FDF5AC" />
                        <SortedAscendingHeaderStyle BackColor="#4D0000" />
                        <SortedDescendingCellStyle BackColor="#FCF6C0" />
                        <SortedDescendingHeaderStyle BackColor="#820000" />
                    </asp:GridView>
                </td>
           </tr>
            </table>
                <asp:HiddenField ID="HidHanhDong" runat="server" />
                <asp:HiddenField ID="HidMaSanPham" runat="server" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:Button ID="btn_PU" runat="server" Text="Button" onclick="btn_PU_Click" />
        <asp:ModalPopupExtender ID="mdpeEdit" runat="server" TargetControlID="btn_PU"
        PopupControlID="PnlEdit"
        PopupDragHandleControlID="PnlEdit_hand"
        CancelControlID="lbtThoat" DropShadow="true"/>
       
        <asp:Panel ID="PnlEdit" runat="server" style=" background-color:White;"    >
            <asp:Panel ID="PnlEdit_hand" runat="server" style="background-color:White;" >
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
                    <table cellpadding="0" cellspacing="0" border="0" width="100%" >
                    

                     <tr>
                    <td style="font-weight: bold; color: #ffffff; background-color: #6699cc; text-align: center;" 
                             colspan="2">
               
                        Cập Nhật Thông tin sản phẩm
               
                    </td>
                    </tr>
                    <tr>
                    <td style="width: 30%;" >
                        Mã sản phẩm:</td>
                        <td style="width:70%;">
                            <asp:TextBox ID="txtMaSP" runat="server" Height="28px" Width="243px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                    <td style="width: 30%;" >
                        Tên Sản phẩm:</td>
                        <td style="width:70%;">
                            <asp:TextBox ID="txtTenSP" runat="server" Height="28px" Width="243px"></asp:TextBox>
                        </td>
                    </tr>
                     <tr>
                    <td style="width: 30%;" >
                        Loại sản phẩm:</td>
                        <td style="width:70%;">
                            <asp:DropDownList ID="drdLoaiSP" runat="server" Height="29px" Width="176px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                     <tr>
                    <td style="width: 30%;" >
                        Ngày đăng:</td>
                        <td style="width:70%;">
                            Ngày<asp:DropDownList ID="drdNgay" runat="server" Height="35px" 
                                style="margin-left: 24px" Width="87px">
                            </asp:DropDownList>
                            &nbsp;Tháng<asp:DropDownList ID="drdThang" runat="server" Height="31px" 
                                style="margin-left: 24px" Width="85px">
                            </asp:DropDownList>
                            Năm<asp:TextBox ID="txtNam" runat="server" Height="18px" Width="87px"></asp:TextBox>
                        </td>
                    </tr>
                     <tr>
                    <td style="width: 30%;" >
                        Chi tiết sản phẩm:</td>
                        <td style="width:70%;">
                            <asp:TextBox ID="txtChiTietSP" runat="server" Height="166px" Width="434px" 
                                TextMode="MultiLine"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                    <td style="width: 30%;" >
                        Hình Ảnh:</td>
                        <td style="width:70%;">
                            <asp:FileUpload ID="FulHinhAnh" runat="server" Height="27px" Width="207px" />
                        </td>
                    </tr>
                     <tr>
                    <td style="width: 30%;" >
                        Giá:</td>
                        <td style="width:70%;">
                            <asp:TextBox ID="txtGia" runat="server" Height="47px" Width="108px"></asp:TextBox>
                        </td>
                    </tr>
                    </table>
                </ContentTemplate>
                </asp:UpdatePanel>
                <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                <td align="right" style="width:60%;">
                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                     <ContentTemplate>
                         <asp:LinkButton ID="LbtSave" runat="server" onclick="LbtSave_Click"><img src="img/floppy-disk-icon.jpg" border="0" />Save..</asp:LinkButton>
                     </ContentTemplate>
                     </asp:UpdatePanel>
                </td>
                 <td align="right" style="width:20%;">
                <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                     <ContentTemplate>
                         <asp:LinkButton ID="LbtUpdate" runat="server" onclick="LbtUpdate_Click"><img src="img/update.jpg" border="0" />Update..</asp:LinkButton>
                     </ContentTemplate>
                     </asp:UpdatePanel>
                </td>
                 <td align="right" style="width:20%;">
                     <asp:LinkButton ID="lbtThoat" runat="server" onclick="lbtThoat_Click"><img src="img/exit.png" border="0" />Exit..</asp:LinkButton>
                 </td>
                </tr>
                </table>

            </asp:Panel>
        </asp:Panel>
        </asp:Content>
